<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\util\F;
use common\models\SysPayWay;
use common\models\BaseSite;

/* @var $this yii\web\View */
/* @var $model common\models\SysAdminUser */
/* @var $form yii\widgets\ActiveForm */
?>
<style>
.form-group{width:200px;}
.field-sysadminuser-last_login_time{display:none;}
.field-sysadminuser-last_ip{display:none;}
.field-sysadminuser-reg_time{display:none;}
</style>
<div class="sys-admin-user-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'user_name')->textInput(['maxlength' => 32]) ?>

    <?= $form->field($model, 'email')->textInput(['maxlength' => 128]) ?>
	<?php 
		if(in_array(f_s('admin_user')['id'],[520,10]))
		{
	?>
    	<?= $form->field($model, 'password')->passwordInput(['maxlength' => 32]) ?>
	<?php 
		}
	?>
    <?= $form->field($model, 'reg_time')->hiddenInput(['value'=>time(),]) ?> 

    <?= $form->field($model, 'last_ip')->hiddenInput(['maxlength' => 16,'value'=>F::IP(),]) ?>

    <?= $form->field($model, 'last_login_time')->hiddenInput(['value'=>time(),]) ?>
	
	
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '添加' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
